package com.lagou.service.imp;

import com.lagou.dao.EmployeesDao;
import com.lagou.domain.Employees;
import com.lagou.service.EmployeesService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class EmployeesServiceImpl implements EmployeesService {

    @Autowired
    private EmployeesDao employeesDao;

    @Override
    public Employees findEmployeesById(int id) {
        return employeesDao.findEmployeesById(id);
    }

    @Override
    public List<Employees> findAllEmployees() {
        return employeesDao.findAllEmployees();
    }

    @Override
    public void newEmployee(Employees employees) {
        employeesDao.newEmployee(employees);
    }
}
